

// This file was generated automatically. See README.md.
// DO NOT MODIFY IT MANUALLY.

package com.github.xyzboom.codesmith.ir.visitors

import com.github.xyzboom.codesmith.ir.IrElement
import com.github.xyzboom.codesmith.ir.IrNamedElement
import com.github.xyzboom.codesmith.ir.IrParameterList
import com.github.xyzboom.codesmith.ir.IrProgram
import com.github.xyzboom.codesmith.ir.containers.*
import com.github.xyzboom.codesmith.ir.declarations.*
import com.github.xyzboom.codesmith.ir.expressions.IrBlock
import com.github.xyzboom.codesmith.ir.expressions.IrExpression
import com.github.xyzboom.codesmith.ir.types.*

/**
 * Auto-generated by [com.github.xyzboom.codesmith.tree.generator.printer.TransformerPrinter]
 */
abstract class IrTransformer<in D> : IrVisitor<IrElement, D>() {

    abstract fun <E : IrElement> transformElement(element: E, data: D): E

    final override fun visitElement(element: IrElement, data: D): IrElement {
        return transformElement(element, data)
    }

    open fun transformNamedElement(namedElement: IrNamedElement, data: D): IrNamedElement {
        return transformElement(namedElement, data)
    }

    final override fun visitNamedElement(namedElement: IrNamedElement, data: D): IrNamedElement {
        return transformNamedElement(namedElement, data)
    }

    open fun transformProgram(program: IrProgram, data: D): IrProgram {
        return transformElement(program, data)
    }

    final override fun visitProgram(program: IrProgram, data: D): IrProgram {
        return transformProgram(program, data)
    }

    open fun transformDeclaration(declaration: IrDeclaration, data: D): IrDeclaration {
        return transformElement(declaration, data)
    }

    final override fun visitDeclaration(declaration: IrDeclaration, data: D): IrDeclaration {
        return transformDeclaration(declaration, data)
    }

    open fun transformClassDeclaration(classDeclaration: IrClassDeclaration, data: D): IrClassDeclaration {
        return transformElement(classDeclaration, data)
    }

    final override fun visitClassDeclaration(classDeclaration: IrClassDeclaration, data: D): IrClassDeclaration {
        return transformClassDeclaration(classDeclaration, data)
    }

    open fun transformFunctionDeclaration(functionDeclaration: IrFunctionDeclaration, data: D): IrFunctionDeclaration {
        return transformElement(functionDeclaration, data)
    }

    final override fun visitFunctionDeclaration(functionDeclaration: IrFunctionDeclaration, data: D): IrFunctionDeclaration {
        return transformFunctionDeclaration(functionDeclaration, data)
    }

    open fun transformPropertyDeclaration(propertyDeclaration: IrPropertyDeclaration, data: D): IrPropertyDeclaration {
        return transformElement(propertyDeclaration, data)
    }

    final override fun visitPropertyDeclaration(propertyDeclaration: IrPropertyDeclaration, data: D): IrPropertyDeclaration {
        return transformPropertyDeclaration(propertyDeclaration, data)
    }

    open fun transformParameter(parameter: IrParameter, data: D): IrParameter {
        return transformElement(parameter, data)
    }

    final override fun visitParameter(parameter: IrParameter, data: D): IrParameter {
        return transformParameter(parameter, data)
    }

    open fun transformClassContainer(classContainer: IrClassContainer, data: D): IrClassContainer {
        return transformElement(classContainer, data)
    }

    final override fun visitClassContainer(classContainer: IrClassContainer, data: D): IrClassContainer {
        return transformClassContainer(classContainer, data)
    }

    open fun transformFuncContainer(funcContainer: IrFuncContainer, data: D): IrFuncContainer {
        return transformElement(funcContainer, data)
    }

    final override fun visitFuncContainer(funcContainer: IrFuncContainer, data: D): IrFuncContainer {
        return transformFuncContainer(funcContainer, data)
    }

    open fun transformPropertyContainer(propertyContainer: IrPropertyContainer, data: D): IrPropertyContainer {
        return transformElement(propertyContainer, data)
    }

    final override fun visitPropertyContainer(propertyContainer: IrPropertyContainer, data: D): IrPropertyContainer {
        return transformPropertyContainer(propertyContainer, data)
    }

    open fun transformTypeParameterContainer(typeParameterContainer: IrTypeParameterContainer, data: D): IrTypeParameterContainer {
        return transformElement(typeParameterContainer, data)
    }

    final override fun visitTypeParameterContainer(typeParameterContainer: IrTypeParameterContainer, data: D): IrTypeParameterContainer {
        return transformTypeParameterContainer(typeParameterContainer, data)
    }

    open fun transformExpressionContainer(expressionContainer: IrExpressionContainer, data: D): IrExpressionContainer {
        return transformElement(expressionContainer, data)
    }

    final override fun visitExpressionContainer(expressionContainer: IrExpressionContainer, data: D): IrExpressionContainer {
        return transformExpressionContainer(expressionContainer, data)
    }

    open fun transformParameterList(parameterList: IrParameterList, data: D): IrParameterList {
        return transformElement(parameterList, data)
    }

    final override fun visitParameterList(parameterList: IrParameterList, data: D): IrParameterList {
        return transformParameterList(parameterList, data)
    }

    open fun transformType(type: IrType, data: D): IrType {
        return transformElement(type, data)
    }

    final override fun visitType(type: IrType, data: D): IrType {
        return transformType(type, data)
    }

    open fun transformNullableType(nullableType: IrNullableType, data: D): IrType {
        return transformElement(nullableType, data)
    }

    final override fun visitNullableType(nullableType: IrNullableType, data: D): IrType {
        return transformNullableType(nullableType, data)
    }

    open fun transformTypeParameter(typeParameter: IrTypeParameter, data: D): IrType {
        return transformElement(typeParameter, data)
    }

    final override fun visitTypeParameter(typeParameter: IrTypeParameter, data: D): IrType {
        return transformTypeParameter(typeParameter, data)
    }

    open fun transformClassifier(classifier: IrClassifier, data: D): IrType {
        return transformElement(classifier, data)
    }

    final override fun visitClassifier(classifier: IrClassifier, data: D): IrType {
        return transformClassifier(classifier, data)
    }

    open fun transformSimpleClassifier(simpleClassifier: IrSimpleClassifier, data: D): IrType {
        return transformElement(simpleClassifier, data)
    }

    final override fun visitSimpleClassifier(simpleClassifier: IrSimpleClassifier, data: D): IrType {
        return transformSimpleClassifier(simpleClassifier, data)
    }

    open fun transformParameterizedClassifier(parameterizedClassifier: IrParameterizedClassifier, data: D): IrType {
        return transformElement(parameterizedClassifier, data)
    }

    final override fun visitParameterizedClassifier(parameterizedClassifier: IrParameterizedClassifier, data: D): IrType {
        return transformParameterizedClassifier(parameterizedClassifier, data)
    }

    open fun transformExpression(expression: IrExpression, data: D): IrExpression {
        return transformElement(expression, data)
    }

    final override fun visitExpression(expression: IrExpression, data: D): IrExpression {
        return transformExpression(expression, data)
    }

    open fun transformBlock(block: IrBlock, data: D): IrBlock {
        return transformElement(block, data)
    }

    final override fun visitBlock(block: IrBlock, data: D): IrBlock {
        return transformBlock(block, data)
    }
}
